import { http } from '@/utils/http.js'

export const preOrderApi = (prescriptionId) => {
	return http.get('/patient/medicine/order/pre', { params: { prescriptionId } })
}

export const createOrderApi = (id, addressId) => {
	return http.post('/patient/medicine/order', { id, addressId })
}

export const orderDetailApi = (id) => {
	return http.get(`/patient/medicine/order/detail/${id}`)
}

export const orderListApi = (status = 10, current = 1, pageSize = 10) => {
	return http.get('/patient/medicine/order/mylist', {
		params: { status, current, pageSize },
	})
}

export const logisticsApi = (id) => {
	return http.get(`/patient/order/${id}/detail/logistics`)
}
